package com.bajiao.service.product;

import com.bajiao.entity.product.Product;
import com.bajiao.vo.product.ProductDetailsResponse;
import com.bajiao.vo.product.ProductResponse;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Description: 产品表
 * @Author: FanJq
 * @Date:   2024-12-13
 * @Version: V1.0
 */
public interface ProductService extends IService<Product> {

    /**
     * @Description
     * 获取店铺商品
     * @date 2024/12/13 15:35
     * @author FanJq
     * @param storeId
     * @return {@link List< ProductResponse>}
    */
    List<ProductResponse> getProductList(String userId, String storeId, String classifyId);

    /**
     * @Description
     * 商品详情
     * @date 2024/12/14 9:24
     * @author FanJq
     * @param storeId
     * @param productId
     * @return {@link ProductDetailsResponse}
    */
    ProductDetailsResponse getProductDetails(String userId, String storeId, String productId);

    /**
     * @Description
     * 获取推荐商品
     * @date 2025/1/13 14:05
     * @author FanJq
     * @param storeId
     * @param productIds
     * @return {@link List< ProductResponse>}
    */
    List<ProductResponse> getProductRecommend(String userId, String storeId, String productIds);

    /**
     * @Description
     * 根据商品id获取
     * @date 2024/12/14 9:26
     * @author FanJq
     * @param storeId
     * @param productId
     * @return {@link Product}
    */
    Product getById(String storeId, String productId);

    /**
     * @Description
     * 处理销量
     * @date 2024/12/16 18:00
     * @author FanJq
     * @param productId
     * @param flag
     * @return
    */
    void salesLogic(String productId, Integer flag, Integer buyNum);
}
